import request from '@/utils/request'

// 查询门店信息列表
export function listStore(query) {
  return request({
    url: '/prod-api/platform/store/list',
    method: 'get',
    params: query
  })
}

// 查询门店信息详细
export function getStore(storeUid) {
  return request({
    url: '/prod-api/platform/store/' + storeUid,
    method: 'get'
  })
}

// 新增门店信息
export function addStore(data) {
  return request({
    url: '/prod-api/platform/store',
    method: 'post',
    data: data
  })
}

// 修改门店信息
export function updateStore(data) {
  return request({
    url: '/prod-api/platform/store',
    method: 'put',
    data: data
  })
}

export function updateStoreStatus(uid,status) {
  let data = {storeUid:uid,dataStatus:status};
  return request({
    url: '/prod-api/platform/store',
    method: 'put',
    data: data
  })
}

export function updateStatus(data) {
  return request({
    url: '/prod-api/platform/store',
    method: 'put',
    data: data
  })
}

// 删除门店信息
export function delStore(storeUid) {
  return request({
    url: '/prod-api/platform/store/' + storeUid,
    method: 'delete'
  })
}

// 查询门店信息下拉列表
export function listStoreSelect() {
  return request({
    url: '/prod-api/platform/store/selectGroup',
    method: 'get'
  })
}

// 查询门店信息下拉列表
export function listStoreSelectSelf() {
  return request({
    url: '/prod-api/platform/store/listSelectSelf',
    method: 'get'
  })
}



export function selectGroup() {
  return request({
    url: '/prod-api/platform/store/selectGroup',
    method: 'get'
  })
}
export function listGroupSelect() {
  return request({
    url: '/prod-api/system/group/listSelect',
    method: 'get'
  })
}

export function listSelect() {
  return request({
    url: '/prod-api/platform/store/listSelect',
    method: 'get'
  })
}


export function listGroupSelectSelf() {
  return request({
    url: '/prod-api/system/group/listSelectSelf',
    method: 'get'
  })
}


export function listRecommend() {
  return request({
    url: '/prod-api/platform/store/listRecommend',
    method: 'get'
  })
}


export function selectByUser(id) {
  return request({
    url: '/prod-api/platform/store/selectByUser/'+id,
    method: 'get'
  })
}


export function selectNoGroup(data) {
  return request({
    url: '/prod-api/platform/store/selectNoGroup',
    method: 'get',
    params: data
  })
}
